<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
  <head>
    <th:block th:replace="~{/_include/header}" />
    <meta name="page-help" content="https://getrebuild.com/docs/manual/project-task" />
    <link rel="stylesheet" type="text/css" th:href="@{/assets/css/project-tasks.css}" />
    <title th:text="${projectName} + ' · ' + ${bundle.L('项目')}"></title>
  </head>
  <body>
    <div class="rb-wrapper rb-fixed-sidebar rb-collapsible-sidebar rb-collapsible-sidebar-hide-logo" th:classappend="${sideCollapsedClazz}">
      <th:block th:replace="~{/_include/nav-top}" />
      <th:block th:replace="~{/_include/nav-left(active=${'nav_project-' + projectId})}" />
      <div class="rb-loading rb-loading-active must-center J_project-load">
        <th:block th:replace="~{/_include/spinner}" />
      </div>
      <div class="rb-content">
        <div class="main-content container-fluid p-0">
          <div class="tools-bar">
            <div class="row">
              <div class="col-sm-6">
                <div class="project-head">
                  <h4>
                    [[${projectName}]]
                    <span th:if="${scope == 1}" class="badge badge-secondary up-1">[[${bundle.L('公开')}]]</span>
                    <span th:if="${status == 2}" class="badge badge-secondary up-1">[[${bundle.L('已归档')}]]</span>
                  </h4>
                  <div class="project-action">
                    <span class="admin-show">
                      <a th:href="${baseUrl} + '/admin/project/' + ${projectId}" th:title="${bundle.L('项目管理')}" target="_blank" class="zicon">
                        <i class="zmdi zmdi-settings"></i>
                      </a>
                    </span>
                  </div>
                </div>
              </div>
              <div class="col-sm-6 text-right d-none d-md-block project-toolbar">
                <div class="btn-group J_search">
                  <button type="button" class="btn btn-link" data-toggle="dropdown">
                    <i class="zmdi zmdi-search icon"></i>
                    <span>[[${bundle.L('搜索')}]]</span>
                    <i class="indicator-primary bg-warning hide" style="top: 1px; right: -7px"></i>
                  </button>
                  <div class="dropdown-menu dropdown-menu-right">
                    <div class="px-4 py-2">
                      <div class="input-group input-search m-0">
                        <input class="form-control" type="text" th:placeholder="${bundle.L('关键词')}" th:title="${bundle.L('输入关键词搜索')}" maxlength="40" />
                        <button class="btn btn-input-clear" type="button"></button>
                        <span class="input-group-btn">
                          <button class="btn btn-secondary" type="button"><i class="icon zmdi zmdi-search"></i></button>
                        </span>
                      </div>
                    </div>
                    <div class="dropdown-divider"></div>
                    <a class="dropdown-item J_filter"><i class="icon zmdi zmdi-filter-list"></i> [[${bundle.L('高级查询')}]]</a>
                  </div>
                </div>
                <div class="btn-group J_views">
                  <button type="button" class="btn btn-link" data-toggle="dropdown">
                    <i class="zmdi zmdi-view-week icon up-1"></i>
                    <span>[[${bundle.L('显示方式')}]]</span>
                  </button>
                  <div class="dropdown-menu dropdown-menu-right">
                    <span class="dropdown-item-text">[[${bundle.L('排序')}]]</span>
                    <a class="dropdown-item check" data-sort="seq">[[${bundle.L('手动拖动')}]]</a>
                    <a class="dropdown-item" data-sort="deadline">[[${bundle.L('最近到期')}]]</a>
                    <a class="dropdown-item" data-sort="modifiedOn">[[${bundle.L('最近修改')}]]</a>
                    <span class="dropdown-item-text">[[${bundle.L('排列方式')}]]</span>
                    <a class="dropdown-item" data-group="plan" href="?group=plan">[[${bundle.L('按任务面板')}]]</a>
                    <a class="dropdown-item" data-group="priority" href="?group=priority">[[${bundle.L('按优先级')}]]</a>
                    <a class="dropdown-item" data-group="deadline" href="?group=deadline">[[${bundle.L('按到期时间')}]]</a>
                    <a class="dropdown-item" data-group="modified" href="?group=modified">[[${bundle.L('按修改时间')}]]</a>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div id="plan-boxes" data-fullcontent="105"></div>
        </div>
      </div>
    </div>
    <th:block th:replace="~{/_include/footer}" />
    <script>
      window.__PageConfig = {
        id: '[[${projectId}]]',
        icon: '[[${iconName}]]',
        projectCode: '[[${projectCode}]]',
        projectName: '[[${projectName}]]',
        projectPlans: [(${projectPlans ?:'null'})],
        isMember: '[[${isMember}]]' === 'true',
        status: [[${status}]],
      }
    </script>
    <script th:src="@{/assets/js/rb-advfilter.js}" type="text/babel"></script>
    <script th:src="@{/assets/js/project/project-tasks.js}" type="text/babel"></script>
    <script th:src="@{/assets/js/rb-forms.js}" type="text/babel"></script>
    <script th:src="@{/assets/js/rb-forms.append.js}" type="text/babel"></script>
  </body>
</html>
